home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / faq-s.zip / REGISTER.PAS < prev    next >
Pascal/Delphi Source File  |  1991-04-13  |  1KB  |  41 lines

  1. uses dos,crt,gensubs,gentypes;
  2.  
  3. var cnt:integer;
  4.     tmp,tmp1:string[30];
  5.     regsfile:file of registerrec;
  6.     reg:registerrec;
  7.     password:mstr;
  8. begin
  9. password:='FAQ IS NUMBER ONE';
  10. clrscr; textcolor (15);
  11. writeln ('FAQ Registration Utility');
  12. writeln;
  13. close (regsfile);
  14. assign (regsfile,'REGISTER.DAT');
  15. if not exist ('REGISTER.DAT') then rewrite (regsfile);
  16. textcolor (11);
  17. writeln ('Please enter the FAQ registration password.');
  18. textcolor (9);
  19. write (': '); textcolor (12);
  20. readln (tmp);
  21. writeln; if not match(tmp,password) then begin
  22. textcolor (15);
  23. writeln ('Invalid Registration Password.');
  24. close (regsfile);
  25. end else begin
  26. textcolor (11);
  27. write ('Please enter your handle'); textcolor (9); write (': '); textcolor (12);
  28. readln (tmp1);
  29. writeln;
  30. textcolor (15);
  31. writeln ('Registration Complete.');
  32. assign (regsfile,'REGISTER.DAT');
  33. rewrite (regsfile);
  34. fillchar (reg,sizeof(reg),'╬');
  35. reg.handle:=tmp1;
  36. reg.serial:=100001;
  37. write (regsfile,reg);
  38. textcolor (7);
  39. close (regsfile);
  40.  end;
  41. end.